package com.woniuxy.educationplatform.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

//随机参数订单编号
public class OrderUtil {
	public static String generateOrderNo() {
		String no = "WN";
		Date now = new Date();
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
		no += dateFormat.format(now);
		String num = "" + new Random().nextInt(10000);// 0-9999

		for (int i = 0; i < 4 - num.length(); i++) {
			num = "0" + num;
		}
		return no + num;
	}

}
